package com.gzhu.knowledgeAdmin.entity;

public class Column {
    private String name; // 列名，例如 "id"
    private String label; // 列标签，例如 "ID"
    private String type; // 列的数据类型，例如 "varchar", "int" 等
    private boolean isAutoIncrement;

    public Column(String name, String label, String type) {  // 修改构造函数以包含新的属性
        this.name = name;
        this.label = label;
        this.type = type;
    }

    // Getter 和 Setter 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean getIsAutoIncrement() {
        return isAutoIncrement;
    }

    public void setIsAutoIncrement(boolean isAutoIncrement) {
        this.isAutoIncrement = isAutoIncrement;
    }

    // 可以根据需要重写 toString, equals, hashCode 等方法
    @Override
    public String toString() {
        return "Column{name='" + name + "', label='" + label + "', type='" + type + "'}";
    }
}
